﻿using System;

namespace program17
{
   internal class Program
    {
        public delegate void SayHi(string name);
       private static void Main(string[] args)
        {
            Hello("张三", SayHiChines);
            Hello("Michael", SayHiEnglish);
         }
       
        public static void Hello(string name,SayHi delegateSayHi)
        {
            delegateSayHi(name);
        }
        public static void SayHiChines(string name)
        {
            Console.WriteLine("{0},你好！你吃饭了吗？", name);

        }
        public static void SayHiEnglish(string name)
        {
            Console.WriteLine("Nice to see you ,{0}!",name);
        }
    }
}
